/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package RuleInterence;

import DataSource.Data;
import DataSource.DataEntry;

/**
 *
 * @author Tuan
 */
public class HealthyRule extends HealthRuleAbs{
    
    
    public HealthyRule(DataEntry dataEntry){
        super(dataEntry);
        this.symptom = "Heathy";        
    }

    public DiagnosticResult checkSymptom(Data data) {
        DiagnosticResult result = new DiagnosticResult(symptom, data);
        return data.getHeartBeat() >= this.minHeartBeat && data.getHeartBeat() <= this.maxHeartBeat &&
                data.getSystolic() >= this.minSBP && data.getSystolic() <= this.maxSBP
                && data.getDiastolic() >= this.minDBP && data.getDiastolic() <= this.maxDBP
                ? result : null; //To change body of generated methods, choose Tools | Templates.
    }
}
